/*
 * DbPoolLock.h
 *
 *  Created on: 2020年4月5日
 *      Author: chuanjiang.zh
 */

#ifndef DBPOOLLOCK_H_
#define DBPOOLLOCK_H_

namespace db
{

    class DbConnectionPool;

class DbPoolLock
{
public:
	explicit DbPoolLock(DbConnectionPool* pool);
	virtual ~DbPoolLock();

    void unlock();

private:
    bool m_locked;
    DbConnectionPool*   m_pool;

    DbPoolLock(const DbPoolLock& mtx);
    DbPoolLock& operator =(const DbPoolLock& mtx);

};

} /* namespace db */

#endif /* DBPOOLLOCK_H_ */
